import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * anchor模块-主播信息
 */
@Entity('anchor_info')
export class AnchorInfoEntity extends BaseEntity {
  @Index()
  @Column({ comment: '主播', length: 100 })
  anchor: string;

  @Column({ comment: '主播姓名', length: 100 })
  name: string;

  @Column({ comment: '主播名称', length: 100 })
  anchorName: string;

  @Column({ comment: '封面', length: 255 })
  cover: string;

  @Column({ comment: '发布时间', type: 'datetime'})
  releaseTime: Date

  @Column({ comment: '图片', nullable: true, type: 'json' })
  image: string[];

  @Column({ comment: '标签 0-图片 1-视频', default: 0 })
  labels: number;

  @Column({ comment: '创建时间', type: 'datetime' })
  createTime: Date;

  @Column({ comment: '更新时间', type: 'datetime' })
  updateTime: Date;

  @Column({ comment: '状态 0-禁用 1-启用', default: 1 })
  status: number;

  @Column({ comment: '权限 0-普通 1-vip', default: 0 })
  permission: number;

  @Column({ comment: '分类' })
  category: string;
  
}
